home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
151-175
/
scopedisk168
/
tinytools
/
wbtf
/
wbtf.asm
< prev
next >
Wrap
Assembly Source File
|
1995-03-19
|
1KB
|
60 lines
; A few equs and equrs.
KickVerNum EQU 31 ; >= Kick 1.1
Fatal EQU 20
Warn EQU 5
OK EQU 0
RETURN EQUR D2
INCLUDE "/include/init.i"
; I suppose this is more than sufficient stack for intuition.
STACK 2000
; Open the intuition library
MOVEQ #Fatal,RETURN
MOVEQ #KickVerNum,D0
LEA IntuitionName(PC),A1
MOVE.L $4.W,A6
CALL OpenLibrary
TST.L D0
BEQ.S FatalExit
; Request that the workbench be sent to front
MOVEQ #Warn,RETURN
MOVE.L D0,A6
CALL WBenchToFront
TST.B D0
BNE.S Exit
; Workbench closed, ask for the workbench to be opened
CALL OpenWorkBench
TST.L D0
BEQ.S WarnExit
; Cleanup
Exit:
MOVEQ #OK,RETURN
WarnExit:
MOVE.L A6,A1
MOVE.L $4.W,A6
CALL CloseLibrary
FatalExit:
MOVE.L RETURN,D0
RTS
; Strings
IntuitionName:
DC.B 'intuition.library',0
CNOP 0,2
END